package main

import (
	"fmt"

	"github.com/myJson"
)

type Student struct{
	Id int
}

type StudentInfo struct {
	Name string
	Nums [5]int
	Score map[string]string
	S  Student `mytag:"student"`
}
func main(){
	studentInfo := StudentInfo{
		Name:"Alice",
		Nums:[5]int{1,2,3,4,5},
		//Score:{"maths":90,"physic":85,"sports":95},
		S:Student{1000},
	}
	studentInfo.Score = make(map[string]string)
	studentInfo.Score["maths"] = "A"
	studentInfo.Score["physic"] = "B"
	b, err := myJson.Marshal(studentInfo)
	if err != nil{
		fmt.Println("error: \n",err)
	}
	fmt.Println(b)
	fmt.Printf("\n")
	fmt.Println(string(b))
	fmt.Printf("\n")
}